package com.hnkywl.sts.entity.base;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.xtgl.Czrz;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: lenovo
 * Date: 13-5-21
 * Time: 上午10:52
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name="T_SYS_FWPZ")
@Where(clause = "deleted!='1'")
public class Fwpz extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqFwpz", allocationSize = 1, sequenceName = "SEQ_SYS_FWPZ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqFwpz")
    private Long id;

    /**
     * 名称
     */
    private  String name;
    /**
     *  Action
     */
    private String  action;
    /**
     *  动作
     */
    private  String info;

    /**
     *  关联字段
     */
   private  String linkfield;


    @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY,mappedBy = "fwpz",targetEntity = Czrz.class)
    @Where(clause = "deleted!='1'")
    private List<Czrz> czrzList;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getLinkfield() {
        return linkfield;
    }

    public void setLinkfield(String linkfield) {
        this.linkfield = linkfield;
    }

    public List<Czrz> getCzrzList() {
        return czrzList;
    }

    public void setCzrzList(List<Czrz> czrzList) {
        this.czrzList = czrzList;
    }
}
